@extends('layouts.comment')
@section('css')
<style>
    td{
        text-align: center;
    }
</style>
@endsection
@section('content')
<div id="dcMain">
    <div id="urHere">租伴 管理中心 > 充值/提现</div>
    <div id="index" class="mainBox" >
        <div class="indexBox">
            <div class="boxTitle">添加参数</div>
                <form id="form1" action="edit_project.html" method="post">
                    <input type="hidden" name="id" value="@if(!empty($log['id'])){{$log['id']}}@endif">
                    项目名称：<input type="text" name="project" class="inpMain" id="project" value="@if(!empty($log['project'])){{$log['project']}}@endif"/>
                    项目类型：<select  id="select" name="class">
                        <option value="">请选择项目类型</option>
                        <option value="1" @if(!empty($log['class'])&& $log['class'] ==1) selected @endif>出租项目</option>
                        <option value="2" @if(!empty($log['class'])&& $log['class'] ==2) selected @endif>职业</option>
                        <option value="3" @if(!empty($log['class'])&& $log['class'] ==3) selected @endif>个人特长</option>
                        <option value="4" @if(!empty($log['class'])&& $log['class'] ==4) selected @endif>出租价格</option>
                        <option value="5" @if(!empty($log['class'])&& $log['class'] ==5) selected @endif>评论</option>
                        <option value="7" @if(!empty($log['class'])&& $log['class'] ==7) selected @endif>开通会员</option>
                        <option value="8" @if(!empty($log['class'])&& $log['class'] ==8) selected @endif>充值租币</option>
                        <option value="9" @if(!empty($log['class'])&& $log['class'] ==9) selected @endif>查看微信价格</option>
                    </select>
                    <span onclick="submit()" class="btnGray" style="cursor:pointer;">提交</span>
                </form>
            </div>
            </div>
        </div>
    </div>

</div>
@endsection
@section('js')
<script type="text/javascript">
    function submit(){
        var project = $("#project").val();
        var type = $("#select").find("option:selected").val();
        if('' == project){
            alert('项目名称不可为空');
            return false;
        }else if (type == ''){
            alert('请选择项目类型')
            return false;
        }
        $("#form1").submit();
    }
</script>
@endsection